;;;; -*- Mode: Lisp; -*-

(in-package :lib.gl)
(proclaim '(inline deg-to-rad))

#-xlui (setq xml::*xmlisp-reader-enabled* nil)

(defconstant +epsilon+ (* 100 single-float-epsilon))
(defconstant +invpi+ (/ 1.0 PI))
(defconstant +zero+ 0.0) ;; Change to 0.0d0 for double floats.
(defconstant +one+ 1.0) ;; etc.
(defconstant +two+ 2.0) ;; etc.
(defconstant +pi/180+ (coerce (/ PI 180) 'single-float))
(defconstant +180/pi+ (coerce (/ 180 PI) 'single-float))

(defun deg-to-rad (deg)
  (* deg (/ PI 180)))

(defun rad-to-deg (rad)
  (* rad +180/pi+));(/ 180 PI)))

(defmacro mult-assign (place value)
  `(setf ,place (* ,place ,value)))

(defmacro div-assign (place value)
  `(setf ,place (/ ,place ,value)))

